Learn R Programming

modello (version 0.1.1)

[.modello_number: Silce Numbers

Description

Slices numbers

Usage

# S3 method for modello_number
[(x, ..., contiguous = TRUE)

Arguments

x

reference object of class 'number'

...

additional parametrers to pass to the slice methods

contiguous

if TRUE it tryes to create a contiguous slice

Value

Returns a reference object of class 'number'

Examples

Run this code
# NOT RUN {
modello.init(10, 10, 10, 10)
x = number(matrix(rnorm(9), 3, 3))
print(x$v)
s1 = x[1, 2]
print(s1)
print(s1$v)
s2 = x[1,2, contiguous=FALSE]
print(s2)
print(s2$v)
modello.close()
# }

Run the code above in your browser using DataLab